From 9c6543d4af04e8bbbdc879164a60cf86e20553ee Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sun, 26 Mar 2006 11:35:11 +0100 Subject: [PATCH] Add format printf attribute to panic() prototype and fix the error this catches. Signed-off-by: Jimi Xenidis Signed-off-by: Keir Fraser --- xen/arch/x86/traps.c | 2 +- xen/include/xen/lib.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 653786e9e3..95e44db6d9 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -705,7 +705,7 @@ asmlinkage int do_page_fault(struct cpu_user_regs *regs) panic("CPU%d FATAL PAGE FAULT\n" "[error_code=%04x]\n" "Faulting linear address: %p\n", - smp_processor_id(), regs->error_code, addr); + smp_processor_id(), regs->error_code, _p(addr)); } propagate_page_fault(addr, regs->error_code); diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index facfa2b093..8b9253b020 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -47,7 +47,8 @@ extern void debugtrace_printk(const char *fmt, ...); #define printk(_f , _a...) printf( _f , ## _a ) extern void printf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); -extern void panic(const char *format, ...); +extern void panic(const char *format, ...) + __attribute__ ((format (printf, 1, 2))); extern long vm_assist(struct domain *, unsigned int, unsigned int); /* vsprintf.c */ -- 2.30.2